package com.authorization.project.authorization.service;

import java.util.List;
import com.authorization.project.authorization.domain.MicroserviceRelationship;

/**
 * 微服务关系Service接口
 * 
 * @author 李晓雷
 * @date 2020-04-24
 */
public interface IMicroserviceRelationshipService 
{
    /**
     * 查询微服务关系
     * 
     * @param id 微服务关系ID
     * @return 微服务关系
     */
    public MicroserviceRelationship selectMicroserviceRelationshipById(Long id);

    /**
     * 查询微服务关系列表
     * 
     * @param microserviceRelationship 微服务关系
     * @return 微服务关系集合
     */
    public List<MicroserviceRelationship> selectMicroserviceRelationshipList(MicroserviceRelationship microserviceRelationship);

    /**
     * 新增微服务关系
     * 
     * @param microserviceRelationship 微服务关系
     * @return 结果
     */
    public int insertMicroserviceRelationship(MicroserviceRelationship microserviceRelationship);

    /**
     * 修改微服务关系
     * 
     * @param microserviceRelationship 微服务关系
     * @return 结果
     */
    public int updateMicroserviceRelationship(MicroserviceRelationship microserviceRelationship);

    /**
     * 批量删除微服务关系
     * 
     * @param ids 需要删除的微服务关系ID
     * @return 结果
     */
    public int deleteMicroserviceRelationshipByIds(Long[] ids);

    /**
     * 删除微服务关系信息
     * 
     * @param id 微服务关系ID
     * @return 结果
     */
    public int deleteMicroserviceRelationshipById(Long id);

    /**
     * 批量添加
     * @param microserviceId
     * @param relationIdsList
     */
    void bachInsertMicroserviceRelationship(Long microserviceId, List<Long> relationIdsList);

    /**
     * 根据微服务主键删除
     * @param microserviceId
     */
    void deleteMicroserviceRelationshipByMicroserviceId(Long microserviceId);

    /**
     * 根据服务主键查询关联主键
     * @param microserviceId
     * @return
     */
    List<Long> selectRelationIdsByMicroserviceId(Long microserviceId);

}
